home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5865 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: howland.reston.ans.net!agate!not-for-mail
  2. From: dim@soda.CSUA.Berkeley.EDU (D. Gerasimatos)
  3. Newsgroups: comp.lang.c,comp.protocols.tcp-ip
  4. Subject: Re: FTP Procedure, Help Wanted
  5. Date: 21 Feb 1996 13:22:41 -0800
  6. Organization: Computer Science Undergraduate Association, UC Berkeley
  7. Message-ID: <4gg2f1$9vg@soda.CSUA.Berkeley.EDU>
  8. References: <EYTAN.96Feb21105625@pan7.telos.com>
  9. NNTP-Posting-Host: soda.csua.berkeley.edu
  10.  
  11. In article <EYTAN.96Feb21105625@pan7.telos.com>,
  12. Eytan Elbaz <eytan@pan7.telos.com> wrote:
  13. >
  14. >
  15. >Hi,
  16. >
  17. >    I was hoping to get a little direction.  I need to write
  18. >a C procedure that will basically be the 'ftp' protocol with
  19. >the command line arguments as the procedure arguments.
  20. >
  21. >(i.e.)  ftp('cd pub','cd misc','get file','put file','bye');
  22. >
  23. >I am sure there must be something like that out there...
  24. >Anybody have a good starting place for me?
  25. >
  26.  
  27.  
  28. I'm not sure what the intended use is so this may be irrelevant, but
  29. why not something like (in csh):
  30.  
  31. ftp -n -i $site <<EOF
  32. user $ruser $passwd
  33. type binary
  34. cd $dir
  35. mget "$file"
  36. quit
  37. EOF
  38.  
  39.  
  40.  
  41. Dimitrios
  42.  
  43.  
  44.